package com.yitao.client.model.product;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import javax.persistence.Id;
import java.math.BigDecimal;
import java.util.Date;



@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "product-index", type = "product", shards = 1, replicas = 0)
public class ProductInfoModelForSearch {
    private static final long serialVersionUID = 1543990716578L;

    /**
     * id	id
     *
     * @mbggenerated
     */
    @Id
    private Long id;

    /**
     * product_code	商品code
     *
     * @mbggenerated
     */
    private String productCode;

    /**
     * product_type	商品类型 1:普通业务类型
     *
     * @mbggenerated
     */
    private Integer productType;

    /**
     * business_type	业务类型 1:普通业务类型
     *
     * @mbggenerated
     */
    private Integer businessType;

    /**
     * product_name	商品名称
     *
     * @mbggenerated
     */
    @Field(type = FieldType.String, searchAnalyzer = "ik", analyzer = "ik")
    private String productName;

    /**
     * product_en_name	商品别名
     *
     * @mbggenerated
     */
    @Field(type = FieldType.String, searchAnalyzer = "ik", analyzer = "ik")
    private String productEnName;

    /**
     * product_description	商品简述
     *
     * @mbggenerated
     */
    @Field(type = FieldType.String, searchAnalyzer = "ik", analyzer = "ik")
    private String productDescription;

    /**
     * brand_code	品牌code
     *
     * @mbggenerated
     */
    private String brandCode;

    /**
     * brand_name	品牌名称
     *
     * @mbggenerated
     */
    private String brandName;

    /**
     * brand_en_name	品牌别名
     *
     * @mbggenerated
     */
    private String brandEnName;

    /**
     * category_id	分类id
     *
     * @mbggenerated
     */
    private Long categoryId;

    /**
     * category_name	分类名称
     *
     * @mbggenerated
     */
    @Field(type = FieldType.String, searchAnalyzer = "ik", analyzer = "ik")
    private String categoryName;

    /**
     * built_place_name	产品产地
     *
     * @mbggenerated
     */
    private Long builtPlaceId;

    /**
     * 产品产地图标url
     */
    private String builtPlaceUrl;

    /**
     * 产品名称
     */
    private String builtPlaceName;

    /**
     * currency	标价币种
     *
     * @mbggenerated
     */
    private String currency;

    /**
     * marker_price	市场价
     *
     * @mbggenerated
     */
    private Long markerPrice;

    /**
     * sales_price	售价
     *
     * @mbggenerated
     */
    private Long salesPrice;

    /**
     * wholesale_price	批发价
     *
     * @mbggenerated
     */
    private Long wholesalePrice;

    /**
     * active_price	活动价
     *
     * @mbggenerated
     */
    private Long activePrice;

    /**
     * fix_price	定价(用于不参与优惠活动 定价商品)
     *
     * @mbggenerated
     */
    private Long fixPrice;

    /**
     * discount	折扣率
     *
     * @mbggenerated
     */
    private BigDecimal discount;

    /**
     * sales_price_type	售价类型 1:正常销售
     *
     * @mbggenerated
     */
    private Integer salesPriceType;

    /**
     * shop_id	所属门店
     *
     * @mbggenerated
     */
    private Long shopId;

    private Integer productSort;

    /**
     * is_sale	是否上架 0 否 1 是
     *
     * @mbggenerated
     */
    private Boolean isSale;

    /**
     * is_recommend	是否推荐 0：否 1：是
     *
     * @mbggenerated
     */
    private Boolean isRecommend;

    /**
     * is_delete	是否被删除 0 否 1 是
     *
     * @mbggenerated
     */
    private Boolean isDelete;

    /**
     * sales_count	商品销量
     *
     * @mbggenerated
     */
    private Integer salesCount;

    /**
     * sku_list	商品sku集合,冗余字段
     *
     * @mbggenerated
     */
    private String skuList;

    /**
     * product_detail_img_list	商品详情图片集合,冗余字段
     *
     * @mbggenerated
     */
    private String productDetailImgList;

    /**
     * 商品主图
     */
    private String productMainImgUrl;

    /**
     * product_detail	商品详情文字性描述
     *
     * @mbggenerated
     */
    private String productDetail;

    /**
     * 商品外部条码(清关使用)
     */
    private String productOutsideBarcode;

    /**
     * create_by	创建人
     *
     * @mbggenerated
     */
    private Long createBy;

    /**
     * create_time	创建时间
     *
     * @mbggenerated
     */
    private Date createTime;

    /**
     * last_update_by	最后更新人
     *
     * @mbggenerated
     */
    private Long lastUpdateBy;

    /**
     * last_update_time	最后修改时间
     *
     * @mbggenerated
     */
    private Date lastUpdateTime;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String productCode) {
        this.productCode = productCode;
    }

    public Integer getProductType() {
        return productType;
    }

    public void setProductType(Integer productType) {
        this.productType = productType;
    }

    public Integer getBusinessType() {
        return businessType;
    }

    public void setBusinessType(Integer businessType) {
        this.businessType = businessType;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductEnName() {
        return productEnName;
    }

    public void setProductEnName(String productEnName) {
        this.productEnName = productEnName;
    }

    public String getProductDescription() {
        return productDescription;
    }

    public void setProductDescription(String productDescription) {
        this.productDescription = productDescription;
    }

    public String getBrandCode() {
        return brandCode;
    }

    public void setBrandCode(String brandCode) {
        this.brandCode = brandCode;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getBrandEnName() {
        return brandEnName;
    }

    public void setBrandEnName(String brandEnName) {
        this.brandEnName = brandEnName;
    }

    public Long getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Long categoryId) {
        this.categoryId = categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public String getBuiltPlaceName() {
        return builtPlaceName;
    }

    public void setBuiltPlaceName(String builtPlaceName) {
        this.builtPlaceName = builtPlaceName;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public Long getMarkerPrice() {
        return markerPrice;
    }

    public void setMarkerPrice(Long markerPrice) {
        this.markerPrice = markerPrice;
    }

    public Long getSalesPrice() {
        return salesPrice;
    }

    public void setSalesPrice(Long salesPrice) {
        this.salesPrice = salesPrice;
    }

    public Long getWholesalePrice() {
        return wholesalePrice;
    }

    public void setWholesalePrice(Long wholesalePrice) {
        this.wholesalePrice = wholesalePrice;
    }

    public Long getActivePrice() {
        return activePrice;
    }

    public void setActivePrice(Long activePrice) {
        this.activePrice = activePrice;
    }

    public Long getFixPrice() {
        return fixPrice;
    }

    public void setFixPrice(Long fixPrice) {
        this.fixPrice = fixPrice;
    }

    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    public Integer getSalesPriceType() {
        return salesPriceType;
    }

    public void setSalesPriceType(Integer salesPriceType) {
        this.salesPriceType = salesPriceType;
    }

    public Long getShopId() {
        return shopId;
    }

    public void setShopId(Long shopId) {
        this.shopId = shopId;
    }

    public Boolean getIsSale() {
        return isSale;
    }

    public void setIsSale(Boolean isSale) {
        this.isSale = isSale;
    }

    public Boolean getIsRecommend() {
        return isRecommend;
    }

    public void setIsRecommend(Boolean isRecommend) {
        this.isRecommend = isRecommend;
    }

    public Boolean getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(Boolean isDelete) {
        this.isDelete = isDelete;
    }

    public Integer getSalesCount() {
        return salesCount;
    }

    public void setSalesCount(Integer salesCount) {
        this.salesCount = salesCount;
    }

    public String getSkuList() {
        return skuList;
    }

    public void setSkuList(String skuList) {
        this.skuList = skuList;
    }

    public String getProductDetailImgList() {
        return productDetailImgList;
    }

    public void setProductDetailImgList(String productDetailImgList) {
        this.productDetailImgList = productDetailImgList;
    }

    public String getProductMainImgUrl() {
        return productMainImgUrl;
    }

    public void setProductMainImgUrl(String productMainImgUrl) {
        this.productMainImgUrl = productMainImgUrl;
    }

    public String getProductDetail() {
        return productDetail;
    }

    public void setProductDetail(String productDetail) {
        this.productDetail = productDetail;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getLastUpdateBy() {
        return lastUpdateBy;
    }

    public void setLastUpdateBy(Long lastUpdateBy) {
        this.lastUpdateBy = lastUpdateBy;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public Long getBuiltPlaceId() {
        return builtPlaceId;
    }

    public void setBuiltPlaceId(Long builtPlaceId) {
        this.builtPlaceId = builtPlaceId;
    }

    public Boolean getSale() {
        return isSale;
    }

    public void setSale(Boolean sale) {
        isSale = sale;
    }

    public Boolean getRecommend() {
        return isRecommend;
    }

    public void setRecommend(Boolean recommend) {
        isRecommend = recommend;
    }

    public Boolean getDelete() {
        return isDelete;
    }

    public void setDelete(Boolean delete) {
        isDelete = delete;
    }

    public String getBuiltPlaceUrl() {
        return builtPlaceUrl;
    }

    public void setBuiltPlaceUrl(String builtPlaceUrl) {
        this.builtPlaceUrl = builtPlaceUrl;
    }

    public Integer getProductSort() {
        return productSort;
    }

    public void setProductSort(Integer productSort) {
        this.productSort = productSort;
    }
}